<template>
	<view class="content">
		<view>
			<view v-for="(item,index) in dataList" class="item " @click="$to(`../product_detail/product_detail`)">
				<view class="item-left">
					<image :src="$u.baseUrl+item.coverimg" mode="widthFix"></image>
				</view>
				<view class="item-right">
					<view class="title">
						{{item.name}}
					</view>
					<view class="price_browse  f30">
						<view class="browse f25 c6">
							库存：{{item.count}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList: [],
			}
		},
		async onLoad() {
			const res= await this.$u.api.numberWarehouse({
				consumer:this.vuex_user.id
			})
			console.log(res);
			this.dataList=res.data	
		},
		methods: {

		}
	}
</script>

<style>
	.content {
		background-color: #F4F4F4;
		height: 100vh;
		padding-top: 10rpx;
	}

	.item {
		background-color: #FFFFFF;
		margin-bottom: 20rpx;
		padding: 20rpx;
		display: flex;
		align-items: center;
	}

	.item-left image {
		width: 160rpx;
	}

	.item-right {
		margin: 0 25rpx;
	}

	.price_browse {
		margin-top: 20rpx;
	}

	.price {
		color: #FF2929;
	}
</style>
